package com.peace.hospital.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peace.hospital.entity.hospitalization.entity.People;
import com.peace.hospital.entity.hospitalization.entity.dto.InpatientmessageDto;
import com.peace.hospital.mapper.InpatientmessageMapper;
import com.peace.hospital.mapper.PeopleMapper;
import com.peace.hospital.mapper.SckbedMapper;
import com.peace.hospital.service.IPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * <p>
 *  病人表实现类
 * </p>
 *
 * @author xie
 * @since 2019-11-05
 */
@Service
public class PeopleServiceImpl extends ServiceImpl<PeopleMapper, People> implements IPeopleService {

    @Autowired
    private PeopleMapper peopleMapper;

    @Autowired
    private InpatientmessageMapper inpatientmessageMapper;

    @Autowired
    private SckbedMapper sckbedMapper;

    @Override
    public boolean insertPeople(InpatientmessageDto dto) {
        return peopleMapper.insertPeople(dto.getPeople());
    }

    @Override
    public boolean insertInnerPeople(InpatientmessageDto dto) {
        return false;
    }


    @Override
    public People selectPeopleByPeople(InpatientmessageDto dto) {

        return peopleMapper.selectPeopleByCode(dto.getPeople());
    }




}
